package com.itheima.d4_abstract_template_method;

// 把东西放冰箱的模板
public abstract class Template {
    public final void putFirdge(){
        System.out.println("1.打开冰箱门");
        put();
        System.out.println("3.关闭冰箱门");
    }

    abstract public void put();

}

class baiyun extends Template{

    @Override
    public void put() {
        System.out.println("把大象放进冰箱");
    }
}

class heitu extends Template{

    @Override
    public void put() {
        System.out.println("把白云放进冰箱");
    }
}
